package com.dmai.aiet.common.base;

import java.io.Serializable;
import java.util.List;

import com.dmai.aiet.archive.entity.SysUser;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 分页实体类
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PageResult<T> implements Serializable {
    private static final long serialVersionUID = -275582248840137389L;


    private int code;

    /**
     * 当前页结果集
     */
    private List<T> data;

    /**
     * 总数
     */
    private Long count;

    public PageResult(Long count, List<SysUser> data) {
        this.count = count;
        this.data = (List<T>) data;
    }
}
